<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
</head>
<style type="text/css">
.mui-input-row label {
	width: 38%;
}

.mui-checkbox, .mui-radio {
	display: inline-block;
}

.mui-radio, .mui-left label {
	width: unset;
}
</style>
<form class="mui-input-group">
	<div class="mui-input-row" style="height: 100px;">
		<label>编辑消息:</label>
		<textarea placeholder="请输入消息内容" style="width: 96%;" name="content"
			class="content"></textarea>
		<span class="must">*</span>
	</div>

	<div class="mui-input-row" style="height: 100%;">
		<label>消息接收人:</label>
		<div class="mui-radio mui-left">
			<label>今天的用户</label> <input name="users" type="radio" value="1"
				checked>
		</div>
		<div class="mui-radio mui-left">
			<label>一周内的用户</label> <input name="users" type="radio" value="2">
		</div>
		<div class="mui-radio mui-left">
			<label>一个月内的用户</label> <input name="users" type="radio" value="3">
		</div>
		<div class="mui-radio mui-left">
			<label>全部</label> <input name="users" type="radio" value="4">
		</div>
	</div>
	<div class="mui-button-row">
		<a type="button" class="mui-btn mui-btn-primary submit">发送</a>
	</div>
</form>
<script type="text/javascript">
    mui('#offCanvasContentScroll').scroll().scrollTo(0,0);
    
    $(".mui-title").html("文本消息");
    
	$(".submit").on("touchstart",function(){
		   var param = $("form").serialize();

		   if($(".content").val() != ""){
				$.post("/message/sendText",param,function(res){
					if(res.success){
						mui.toast("发送成功");
			    	}else{
			    		mui.toast(res.message);
			    	}
					
				})
	    	}else{
		    	mui.toast("带 "+'<span style="color:red;">*</span> 为必填项');
	    	}
	   })
	   
	</script>
</html>